<div bsModal #downloadModal="bs-modal" class="modal fade" id="downloadModal" tabindex="-1" role="dialog"
     [config]="{ backdrop: true }"
     aria-labelledby="downloadModalLabel" aria-hidden="true" *ngIf="isOpen()" (onHidden)="close()" >
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" aria-hidden="true" (click)="close()">
                    <span class="pficon pficon-close"></span>
                </button>
                <h4 class="modal-title" id="downloadModalLabel">Download API Specification</h4>
            </div>
            <div class="modal-body">
                <div>
                    <p>Make a few choices below and then download the specification.</p>
                    <hr />
                    <div class="form form-horizontal">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">Format</label>
                            <div class="col-sm-10">
                                <drop-down [id]="'inheritance-type'" [value]="format" [options]="formats"
                                           (onValueChange)="format = $event"></drop-down>
                            </div>
                        </div>
                        <div class="form-group" *ngIf="!isGraphQL()">
                            <label class="col-sm-2 control-label">References</label>
                            <div class="col-sm-10">
                                <drop-down [id]="'inheritance-type'" [value]="dereference" [options]="refOptions"
                                           (onValueChange)="dereference = $event"></drop-down>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" (click)="close()">Close</button>
                <a class="btn btn-primary" href="{{ downloadLink() }}" (click)="close()" download="{{ downloadName() }}">Download</a>
            </div>
        </div>
    </div>
</div>
